<?php
/**
 * adds the required elements to the page header
 *
 * @package    	Digitalus\Ui
 * @copyright  	Copyright (c) 2009,  Digitalus Media USA (http://digitalusmedia.net)
 * @license    	New BSD License, library/Dig/License.txt
 * @version 	2.0
 * 
 */
class DigUi_View_Helper_DigUiHeader extends Zend_View_Helper_Abstract 
{
    public function digUiHeader()
    {
        // load the stylesheets
        $skinConfig = DigUi_Service_Template::currentSkin();
        if($skinConfig->stylesheet) {
            foreach ($skinConfig->stylesheet as $stylesheet) {
                DigUi_Service_Template::addStylesheet($stylesheet);
            }
        }

        $settings = Dig_Service_Module::settings('digUi');
        $header[] = '<link media="screen" type="text/css" href="' . $settings['digitalus']['css'] . '" rel="stylesheet">';
        
        $header[] = $this->view->headMeta();
        $header[] = $this->view->headLink();
        $header[] = $this->view->headScript();
        $header[] = $this->view->headStyle();
        $header[] = $this->view->headTitle();
        return implode(PHP_EOL, $header);
    }
}
?>